<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>求职者登录</title>
    <!-- 引入 layui.css -->
    <link rel="stylesheet" href="//unpkg.com/layui@2.6.8/dist/css/layui.css">
    <script type="text/javascript" src="//unpkg.com/layui@2.6.8/dist/layui.js"></script>
</head>
<body>
<h1 style="text-align: center;padding: 70px 0 20px 0">Login</h1>
<form class="layui-form" th:action="@{check}" method="post">
    <div class="layui-form-item" style="margin-left: 580px">
        <label class="layui-form-label">账&emsp;&emsp;号</label>
        <div class="layui-input-block">
            <input type="text" required lay-verify="required" placeholder="请输入账号" autocomplete="off"
                   name="username" class="layui-input" style="width: 25%">
        </div>
    </div>
    <div class="layui-form-item" style="margin-left: 580px">
        <label class="layui-form-label">密&emsp;&emsp;码</label>
        <div class="layui-input-block">
            <input type="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off"
                   name="password" class="layui-input" style="width: 25%">
        </div>
    </div>
    <div class="layui-form-item" style="margin-left: 580px">
        <label class="layui-form-label">角&emsp;&emsp;色</label>
        <div class="layui-input-block">
            <input type="radio" name="role" value="0" title="企业">
            <input type="radio" name="role" value="1" title="求职者" checked>
        </div>
    </div>
    <div class="layui-form-item" style="margin-left: 580px">
        <div class="layui-input-block">
            <p style="color: red;padding-left: 38px" th:text="${msg}" th:if="${not #strings.isEmpty(msg)}"></p>
            <button class="layui-btn" lay-submit>登录</button>
            <a th:href="@{register}" class="layui-btn layui-btn-normal">注册</a>
        </div>
    </div>
</form>
<script type="text/javascript">
    layui.use('form', function () {
        const form = layui.form;
        form.render();
    });
</script>
</body>
</html>